<?php

require_once("../private/system/dycmsapi.php");

try {
	
dyInit();
uiLoadLibrary('client');

//
// Create the page
//

$page = new cHtmlPage();

$page->AddChild($main = new cHtmlWrapper(<<<HTMLEND
<div id="page">
HTMLEND
	,
	<<<HTMLEND
</div>
HTMLEND
));

$page->AddHtmlHeader(<<<HTMLEND
<link rel="stylesheet" href="assets/content.css">
<link rel="stylesheet" href="assets/page.css">
HTMLEND
);
$page->AddHtmlHeader('<script language="javascript" type="text/javascript" src="/private/system/public/js/fixpng.js" id="editor"></script>');

$main->AddChild($cLogo = new cHtmlWrapper('<div id="header">','</div>'));
$cLogo->AddChild(new modLogin());
$main->AddChild($cNav = new cHtmlWrapper('<div id="sidepanel">','</div>'));


$main->AddChild($cNode = new cHtmlWrapper('<div id="output">', '</div>'));

$page->SetContentNode($cNode);
$page->AddModuleContainer($cNav);

$page->AddModule(new cAdminMenuModule());


//
// Process commands
//

processCmsCommands($page);


//
// Add footer
//

$cNode->AddChild(<<<END
<div id="footer">
<b>guilt</b>engine<span class="superscript">01</span> is brought to you by <a href="#">dynamo studios</a>
</div>
END
);


//
// Initialize modules
//

$page->Display();

dyEnd();

}
catch(Exception $e)
{
	$ex = new cUiException($e);
	$ex->Display();
}

?>
